package cn.bincker.mycaptcha.basic;

import cn.bincker.mycaptcha.basic.entity.MyAnswer;

import javax.servlet.http.HttpServletRequest;
import java.util.Optional;

/**
 * 答案存储器，负责存储答案和获取答案
 */
public interface AnswerStorage<T extends MyAnswer> {
    void store(HttpServletRequest request, T answer);
    Optional<T> getAndRemove(HttpServletRequest request);
}
